import request from '@/axios/request';
import url from '@/axios/url';
const { mesUrl, adminUrl } = url();
// 导出url
export const exportUrl = `${mesUrl}mesTrackingCardClearLog/export`
// 分页查询
export function getList (params = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardClearLog/selectList`,
    method: 'get',
    params,
  });
}
// 新增
export function rowCreate (data = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardClearLog`,
    method: 'post',
    data,
  });
}
// 修改
export function rowUpdate (data = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardClearLog`,
    method: 'put',
    data,
  });
}
// 删除
export function rowDel (id) {
  return request({
    url: `${mesUrl}mesTrackingCardClearLog/${id}`,
    method: 'put',
  });
}
// 详情
export function rowDetail (id) {
  return request({
    url: `${mesUrl}mesTrackingCardClearLog/info/${id}`,
    method: 'get',
  });
}

// 导入用户
export function importData (data = {}) {
  return request({
    url: `${mesUrl}mesTrackingCardClearLog/import`,
    method: 'POST',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
    }
  })
}
// 下载模板
export const downloadTemplateUrl = `${mesUrl}mesTrackingCardClearLog/template`

// 查询 报工标识 1是 0否列表
export function getIsSubmittedList () {
  return request({
    url: `${adminUrl}dict/type/yes_or_not`,
    method: 'get',
  });
}
// 查询打印标识 1是 0否列表
export function getIsPrintList () {
  return request({
    url: `${adminUrl}dict/type/yes_or_not`,
    method: 'get',
  });
}
